const app = getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
    
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.loadGifts()
  },
  loadGifts:function(){
       let that=this
       var data = { 'memberId': app.globalData.userInfo.id, 'searchType': 1 }
       var promise = app.synPostData('gift/select', data)
       promise.then(function (res) {
            that.setData({
                 gifts:res.data.result
            })
       })
  }

})